<template>
  <div>
    <h1>查看用户详情{{route.params.id}}</h1>

    <router-link :to="{name:'userEdit',params:{id:route.params.id},query:{name:route.query.name,age:40}}" class="btn btn-primary">编辑用户</router-link>





  </div>
</template>
<script>
export default {
  name:'UserDetail'
}

</script>
<script setup>
import { ref } from 'vue'
import { useRoute,useRouter } from 'vue-router'
const route = useRoute()
const router = useRouter()

console.log(route);
console.log(router);

const id = ref('1')
</script>
